<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Icarous: /home/research133/Software/Icarous2/cFS/apps/apInterface/fsw/src/apInterface.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Icarous
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_c1698e121239b1aba7f6e782e4514e49.html">cFS</a></li><li class="navelem"><a class="el" href="dir_7ee4ce95da95d11e80a01c5101ed8d14.html">apps</a></li><li class="navelem"><a class="el" href="dir_a56f601be72ccb79ee220fb7a50e7e1c.html">apInterface</a></li><li class="navelem"><a class="el" href="dir_0d9e1875e755a21d76ed9200317b5a0e.html">fsw</a></li><li class="navelem"><a class="el" href="dir_4b0868aa928487d8f2011bc0b4a145bd.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">apInterface.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>function definitions for apInterface app  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;<a class="el" href="ardupilot__msg_8h_source.html">msgdef/ardupilot_msg.h</a>&gt;</code><br />
<code>#include &quot;<a class="el" href="apInterface_8h_source.html">apInterface.h</a>&quot;</code><br />
<code>#include &quot;apInterface_version.h&quot;</code><br />
<code>#include &quot;apIntf_tbl.c&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for apInterface.c:</div>
<div class="dyncontent">
<div class="center"><img src="apInterface_8c__incl.png" border="0" usemap="#_2home_2research133_2Software_2Icarous2_2cFS_2apps_2apInterface_2fsw_2src_2apInterface_8c" alt=""/></div>
<map name="_2home_2research133_2Software_2Icarous2_2cFS_2apps_2apInterface_2fsw_2src_2apInterface_8c" id="_2home_2research133_2Software_2Icarous2_2cFS_2apps_2apInterface_2fsw_2src_2apInterface_8c">
<area shape="rect" id="node2" href="ardupilot__msg_8h.html" title="Ardupilot message definitions. " alt="" coords="5,184,167,211"/>
<area shape="rect" id="node7" href="apInterface_8h.html" title="function declarations, definitions of macros, datastructures and global variables for the apInterface..." alt="" coords="633,109,731,136"/>
<area shape="rect" id="node50" href="apInterface__version_8h_source.html" title="apInterface_version.h" alt="" coords="755,109,902,136"/>
<area shape="rect" id="node15" href="apInterface__events_8h.html" title="Event definitions for autopilot interface app. " alt="" coords="794,184,938,211"/>
<area shape="rect" id="node16" href="ardupilot__msgids_8h.html" title="Message ID definition of ardupilot app messages. " alt="" coords="963,184,1140,211"/>
<area shape="rect" id="node17" href="scheduler__msgids_8h.html" title="message topics published by the scheduler " alt="" coords="1165,184,1349,211"/>
<area shape="rect" id="node18" href="port__lib_8h.html" title="serial/socket port library " alt="" coords="645,184,719,211"/>
<area shape="rect" id="node21" href="ardupilotmega_2mavlink_8h.html" title="MAVLink comm protocol built from ardupilotmega.xml. " alt="" coords="542,259,694,300"/>
<area shape="rect" id="node22" href="ardupilotmega_2version_8h.html" title="MAVLink comm protocol built from ardupilotmega.xml. " alt="" coords="2493,348,2567,375"/>
<area shape="rect" id="node23" href="ardupilotmega_8h.html" title="MAVLink comm protocol generated from ardupilotmega.xml. " alt="" coords="2354,348,2469,375"/>
<area shape="rect" id="node24" href="protocol_8h_source.html" title="../protocol.h" alt="" coords="4670,430,4761,457"/>
<area shape="rect" id="node25" href="mavlink__msg__sensor__offsets_8h_source.html" title="./mavlink_msg_sensor\l_offsets.h" alt="" coords="3915,423,4068,464"/>
<area shape="rect" id="node26" href="mavlink__msg__set__mag__offsets_8h_source.html" title="./mavlink_msg_set_mag\l_offsets.h" alt="" coords="4092,423,4256,464"/>
<area shape="rect" id="node27" href="mavlink__msg__meminfo_8h_source.html" title="./mavlink_msg_meminfo.h" alt="" coords="4280,430,4455,457"/>
<area shape="rect" id="node28" href="mavlink__msg__ap__adc_8h_source.html" title="./mavlink_msg_ap_adc.h" alt="" coords="4479,430,4645,457"/>
<area shape="rect" id="node29" href="mavlink__msg__digicam__configure_8h_source.html" title="./mavlink_msg_digicam\l_configure.h" alt="" coords="4785,423,4944,464"/>
<area shape="rect" id="node30" href="mavlink__msg__digicam__control_8h_source.html" title="./mavlink_msg_digicam\l_control.h" alt="" coords="277,423,436,464"/>
<area shape="rect" id="node31" href="mavlink__msg__mount__configure_8h_source.html" title="./mavlink_msg_mount\l_configure.h" alt="" coords="460,423,611,464"/>
<area shape="rect" id="node32" href="mavlink__msg__mount__control_8h_source.html" title="./mavlink_msg_mount\l_control.h" alt="" coords="635,423,785,464"/>
<area shape="rect" id="node33" href="mavlink__msg__mount__status_8h_source.html" title="./mavlink_msg_mount\l_status.h" alt="" coords="809,423,960,464"/>
<area shape="rect" id="node34" href="mavlink__msg__fence__point_8h_source.html" title="./mavlink_msg_fence\l_point.h" alt="" coords="985,423,1131,464"/>
<area shape="rect" id="node35" href="mavlink__msg__fence__fetch__point_8h_source.html" title="./mavlink_msg_fence\l_fetch_point.h" alt="" coords="1155,423,1302,464"/>
<area shape="rect" id="node36" href="mavlink__msg__fence__status_8h_source.html" title="./mavlink_msg_fence\l_status.h" alt="" coords="1326,423,1473,464"/>
<area shape="rect" id="node37" href="mavlink__msg__ahrs_8h_source.html" title="./mavlink_msg_ahrs.h" alt="" coords="1497,430,1648,457"/>
<area shape="rect" id="node38" href="mavlink__msg__simstate_8h_source.html" title="./mavlink_msg_simstate.h" alt="" coords="1672,430,1847,457"/>
<area shape="rect" id="node39" href="mavlink__msg__hwstatus_8h_source.html" title="./mavlink_msg_hwstatus.h" alt="" coords="1871,430,2050,457"/>
<area shape="rect" id="node40" href="mavlink__msg__radio_8h_source.html" title="./mavlink_msg_radio.h" alt="" coords="2075,430,2228,457"/>
<area shape="rect" id="node41" href="mavlink__msg__limits__status_8h_source.html" title="./mavlink_msg_limits\l_status.h" alt="" coords="2252,423,2397,464"/>
<area shape="rect" id="node42" href="mavlink__msg__wind_8h_source.html" title="./mavlink_msg_wind.h" alt="" coords="2422,430,2574,457"/>
<area shape="rect" id="node43" href="mavlink__msg__data16_8h_source.html" title="./mavlink_msg_data16.h" alt="" coords="2599,430,2763,457"/>
<area shape="rect" id="node44" href="mavlink__msg__data32_8h_source.html" title="./mavlink_msg_data32.h" alt="" coords="2787,430,2951,457"/>
<area shape="rect" id="node45" href="mavlink__msg__data64_8h_source.html" title="./mavlink_msg_data64.h" alt="" coords="2975,430,3139,457"/>
<area shape="rect" id="node46" href="mavlink__msg__data96_8h_source.html" title="./mavlink_msg_data96.h" alt="" coords="3163,430,3327,457"/>
<area shape="rect" id="node47" href="mavlink__msg__rangefinder_8h_source.html" title="./mavlink_msg_rangefinder.h" alt="" coords="3351,430,3541,457"/>
<area shape="rect" id="node48" href="mavlink__msg__airspeed__autocal_8h_source.html" title="./mavlink_msg_airspeed\l_autocal.h" alt="" coords="3565,423,3727,464"/>
<area shape="rect" id="node49" href="mavlink__msg__rally__point_8h_source.html" title="./mavlink_msg_rally\l_point.h" alt="" coords="3751,423,3890,464"/>
</map>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a00a750f06000bcc53a5aa3082de40481"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="apInterface_8c.html#a00a750f06000bcc53a5aa3082de40481">APINTERFACE_AppMain</a> (void)</td></tr>
<tr class="memdesc:a00a750f06000bcc53a5aa3082de40481"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is the main entry point for your application that will be used by cFS.  <a href="#a00a750f06000bcc53a5aa3082de40481">More...</a><br /></td></tr>
<tr class="separator:a00a750f06000bcc53a5aa3082de40481"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9236e1ef806d65661c542bf0abd92524"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="apInterface_8c.html#a9236e1ef806d65661c542bf0abd92524">APINTERFACE_AppInit</a> (void)</td></tr>
<tr class="memdesc:a9236e1ef806d65661c542bf0abd92524"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize app data: set up pipes, subscribe to messages, read table, initialize data.  <a href="#a9236e1ef806d65661c542bf0abd92524">More...</a><br /></td></tr>
<tr class="separator:a9236e1ef806d65661c542bf0abd92524"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a085ed68bcee25fae012d6481b6515666"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="apInterface_8c.html#a085ed68bcee25fae012d6481b6515666">APINTERFACE_InitializeAPPorts</a> ()</td></tr>
<tr class="memdesc:a085ed68bcee25fae012d6481b6515666"><td class="mdescLeft">&#160;</td><td class="mdescRight">Open ports to autopilot and intialize ports here.  <a href="#a085ed68bcee25fae012d6481b6515666">More...</a><br /></td></tr>
<tr class="separator:a085ed68bcee25fae012d6481b6515666"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a667e998823014f393463cfbb595a12aa"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="apInterface_8c.html#a667e998823014f393463cfbb595a12aa">APINTERFACE_ProcessAPData</a> ()</td></tr>
<tr class="memdesc:a667e998823014f393463cfbb595a12aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read data from the autopilot and construct software bus messages.  <a href="#a667e998823014f393463cfbb595a12aa">More...</a><br /></td></tr>
<tr class="separator:a667e998823014f393463cfbb595a12aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aafafd8cad7feb95f8f5bc64470b9190b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="apInterface_8c.html#aafafd8cad7feb95f8f5bc64470b9190b">APINTERFACE_GetADSBData</a> ()</td></tr>
<tr class="memdesc:aafafd8cad7feb95f8f5bc64470b9190b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read ADSB data from ADSB transponder and publish traffic data on software bus.  <a href="#aafafd8cad7feb95f8f5bc64470b9190b">More...</a><br /></td></tr>
<tr class="separator:aafafd8cad7feb95f8f5bc64470b9190b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a73fad45a01862f58139ae3af8df1443f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="apInterface_8c.html#a73fad45a01862f58139ae3af8df1443f">APINTERFACE_ProcessSBData</a> ()</td></tr>
<tr class="memdesc:a73fad45a01862f58139ae3af8df1443f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read data from software bus and send data to autopilot.  <a href="#a73fad45a01862f58139ae3af8df1443f">More...</a><br /></td></tr>
<tr class="separator:a73fad45a01862f58139ae3af8df1443f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7bf7abb38d0f858e471ac8dac713abfe"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="apInterface_8c.html#a7bf7abb38d0f858e471ac8dac713abfe">APINTERFACE_AppCleanUp</a> ()</td></tr>
<tr class="separator:a7bf7abb38d0f858e471ac8dac713abfe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac1eeab798259137088a788a94d20df83"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="apInterface_8c.html#ac1eeab798259137088a788a94d20df83">ApInterfaceTableValidationFunc</a> (void *TblPtr)</td></tr>
<tr class="separator:ac1eeab798259137088a788a94d20df83"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:afdede3c3d4678bdb287cf3b61dbed15e"><td class="memItemLeft" align="right" valign="top">CFE_EVS_BinFilter_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="apInterface_8c.html#afdede3c3d4678bdb287cf3b61dbed15e">APInterface_EventFilters</a> []</td></tr>
<tr class="memdesc:afdede3c3d4678bdb287cf3b61dbed15e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Event filter definition for ardupilot.  <a href="#afdede3c3d4678bdb287cf3b61dbed15e">More...</a><br /></td></tr>
<tr class="separator:afdede3c3d4678bdb287cf3b61dbed15e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>function definitions for apInterface app </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a7bf7abb38d0f858e471ac8dac713abfe"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void APINTERFACE_AppCleanUp </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Clean up variables </p>

</div>
</div>
<a class="anchor" id="a9236e1ef806d65661c542bf0abd92524"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void APINTERFACE_AppInit </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize app data: set up pipes, subscribe to messages, read table, initialize data. </p>
<p>Initialize app properties </p>

</div>
</div>
<a class="anchor" id="a00a750f06000bcc53a5aa3082de40481"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void APINTERFACE_AppMain </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This is the main entry point for your application that will be used by cFS. </p>
<p>Entry point for app </p>

</div>
</div>
<a class="anchor" id="aafafd8cad7feb95f8f5bc64470b9190b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void APINTERFACE_GetADSBData </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Read ADSB data from ADSB transponder and publish traffic data on software bus. </p>
<p>Process ADSB data </p>

</div>
</div>
<a class="anchor" id="a085ed68bcee25fae012d6481b6515666"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void APINTERFACE_InitializeAPPorts </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Open ports to autopilot and intialize ports here. </p>
<p>Initialize ports to the autopilot </p>

</div>
</div>
<a class="anchor" id="a667e998823014f393463cfbb595a12aa"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void APINTERFACE_ProcessAPData </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Read data from the autopilot and construct software bus messages. </p>
<p>Process data from the autopilot </p>

</div>
</div>
<a class="anchor" id="a73fad45a01862f58139ae3af8df1443f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void APINTERFACE_ProcessSBData </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Read data from software bus and send data to autopilot. </p>
<p>Process data from the SB message </p>

</div>
</div>
<a class="anchor" id="ac1eeab798259137088a788a94d20df83"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ApInterfaceTableValidationFunc </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>TblPtr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Validate table data </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">*TblPtr</td><td>pointer to table </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a class="anchor" id="afdede3c3d4678bdb287cf3b61dbed15e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">CFE_EVS_BinFilter_t APInterface_EventFilters[]</td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">=</div><div class="line">{  </div><div class="line">        { 1 ,       0x0000},</div><div class="line">        { 2 ,       0x0000},</div><div class="line">}</div></div><!-- fragment -->
<p>Event filter definition for ardupilot. </p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
